@import './var.less';

[inline-block] {
    display: inline-block;
}
[block] {
    display: block;
}

[relative] {
    position: relative;
}

[abs-bottom] {
    position: absolute;
    bottom: 0;
}

[full] {
    width: 100%;
    height: 100%;
}

[full-max] {
    max-width: 100%;
    max-height: 100%;
}

[text-center] {
    text-align: center !important;

    input {
        text-align: center;
    }
}

[core] {
    display:flex;
    align-items:center;
    justify-content:center
}

[text-left] {
    text-align: left !important;
}

[ellipsis] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[text-right] {
    text-align: right !important;
}

[center] {
    margin-left: auto !important;
    margin-right: auto !important;
}

[middle] {
    display: table-cell;
    vertical-align :middle;
}

[left] {
    float: left !important;
}

[right] {
    float: right !important;
}
/* height */
[h1] {
    height: 20px !important;
}

[h2] {
    height: 30px !important;
}

[h3] {
    height: 40px !important;
}

[h4] {
    height: 60px !important;
}

[h5] {
    height: 80px !important;
}

[h6] {
    height: 100px !important;
}

[h7] {
    height: 120px !important;
}

[h8] {
    height: 160px !important;
}

[h9] {
    height: 200px !important;
}

[h10] {
    height: 240px !important;
}

[lh1] {
    display: inline-block;
    height: 20px !important;
    line-height: 19px !important;
    padding-top: 0;
    padding-bottom: 0;
}

[lh2] {
    display: inline-block;
    height: 30px !important;
    line-height: 29px !important;
    padding-top: 0;
    padding-bottom: 0;
}

[lh3] {
    display: inline-block;
    height: 40px !important;
    line-height: 39px !important;
    padding-top: 0;
    padding-bottom: 0;
}

[lh4] {
    display: inline-block;
    height: 60px !important;
    line-height: 59px !important;
    padding-top: 0;
    padding-bottom: 0;
}

[lh5] {
    display: inline-block;
    height: 80px !important;
    line-height: 79px !important;
    padding-top: 0;
    padding-bottom: 0;
}
/* width */
[long] {
    width: 100% !important;
}

[w1] {
    width: 20px !important;
}

[w2] {
    width: 30px !important;
}

[w3] {
    width: 40px !important;
}

[w4] {
    width: 60px !important;
}

[w5] {
    width: 80px !important;
}

[w6] {
    width: 100px !important;
}

[w7] {
    width: 120px !important;
}

[w8] {
    width: 160px !important;
}

[w9] {
    width: 200px !important;
}

[w10] {
    width: 240px !important;
}

[lw1] {
    display: inline-block;
    width: 20px;
}

[lw2] {
    display: inline-block;
    width: 30px;
}

[lw3] {
    display: inline-block;
    width: 40px;
}

[lw4] {
    display: inline-block;
    width: 60px;
}

[lw5] {
    display: inline-block;
    width: 80px;
}

[lw6] {
    display: inline-block;
    width: 100px;
}

[lw7] {
    display: inline-block;
    width: 120px;
}

[lw8] {
    display: inline-block;
    width: 160px;
}
/* color */
[gray1] {
    color: @gray1 !important;
}

[gray2] {
    color: @gray2 !important;
}

[gray3] {
    color: @gray3 !important;
}

[gray4] {
    color: @gray4 !important;
}
/* background-color */
[bg-cover] {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-image: url(../images/placeholder.png);
}
[bg1] {
    background-color: #F7F9FA;
}

[bg2] {
    background-color: #333;
}

[bg3] {
    background-color: #222;
}

[bg-gray1] {
    background-color: @gray1;
}

[bg-gray2] {
    background-color: @gray2;
}

[bg-gray3] {
    background-color: @gray3;
}

[bg-gray4] {
    background-color: @gray4;
}

[bg-gray5] {
    background-color: @gray5;
}

[bg-white] {
    background-color: white;
}
/* size */
[sz0] {
    font-size: 12px !important;
}

[sz1] {
    font-size: 14px !important;
}

[sz2] {
    font-size: 16px !important;
}

[sz3] {
    font-size: 18px !important;
}

[sz4] {
    font-size: 28px !important;
}

[strong] {
    font-weight: 700 !important;
}
/* margin */
[mgt1] {
    margin-top: 5px !important;
}

[mgt2] {
    margin-top: 10px !important;
}

[mgt3] {
    margin-top: 20px !important;
}

[mgt4] {
    margin-top: 30px !important;
}

[mgt5] {
    margin-top: 40px !important;
}

[mgt6] {
    margin-top: 80px !important;
}

[mgl1] {
    margin-left: 5px !important;
}

[mgl2] {
    margin-left: 10px !important;
}

[mgl3] {
    margin-left: 20px !important;
}

[mgl4] {
    margin-left: 30px !important;
}

[mgl5] {
    margin-left: 40px !important;
}

[mgl6] {
    margin-left: 80px !important;
}

[mgr1] {
    margin-right: 5px !important;
}

[mgr2] {
    margin-right: 10px !important;
}

[mgr3] {
    margin-right: 20px !important;
}

[mgr4] {
    margin-right: 30px !important;
}

[mgr5] {
    margin-right: 40px !important;
}

[mgr6] {
    margin-right: 80px !important;
}

[mgb1] {
    margin-bottom: 5px !important;
}

[mgb2] {
    margin-bottom: 10px !important;
}

[mgb3] {
    margin-bottom: 20px !important;
}

[mgb4] {
    margin-bottom: 30px !important;
}

[mgb5] {
    margin-bottom: 40px !important;
}

[mgb6] {
    margin-bottom: 80px !important;
}
/* padding */
[pd1] {
    padding: 5px !important;
}

[pd2] {
    padding: 10px !important;
}

[pd3] {
    padding: 15px !important;
}

[pd4] {
    padding: 20px !important;
}

[pd5] {
    padding: 30px !important;
}

[pdx1] {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

[pdx2] {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

[pdx3] {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

[pdx4] {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

[pdx5] {
    padding-left: 30px !important;
    padding-right: 30px !important;
}

[pdy1] {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

[pdy2] {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

[pdy3] {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

[pdy4] {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}
/* border */
[bd-circle] {
    border-radius: 1000px;
    border: 1px solid #ddd;
    overflow: hidden;
}

[bd-gray4] {
    border: 1px solid @gray4;
}

[bd-gray3] {
    border: 1px solid @gray3;
}

[bd-gray2] {
    border: 1px solid @gray2;
}

[bd-gray1] {
    border: 1px solid @gray1;
}

[bdb-gray1] {
    border-bottom: 1px solid @gray1;
}

[bdb-gray2] {
    border-bottom: 1px solid @gray2;
}

[bdb-gray3] {
    border-bottom: 1px solid @gray3;
}

[bdb-gray4] {
    border-bottom: 1px solid @gray4;
}

[bdb-gray5] {
    border-bottom: 1px solid @gray5;
}

[bdl-gray1] {
    border-left: 1px solid @gray1;
}

[bdl-gray2] {
    border-left: 1px solid @gray2;
}

[bdl-gray3] {
    border-left: 1px solid @gray3;
}

[bdl-gray4] {
    border-left: 1px solid @gray4;
}

[bdr-gray1] {
    border-right: 1px solid @gray1;
}

[bdr-gray2] {
    border-right: 1px solid @gray2;
}

[bdr-gray3] {
    border-right: 1px solid @gray3;
}

[bdr-gray4] {
    border-right: 1px solid @gray4;
}

[bdt-gray1] {
    border-top: 1px solid @gray1;
}

[bdt-gray2] {
    border-top: 1px solid @gray2;
}

[bdt-gray3] {
    border-top: 1px solid @gray3;
}

[bdt-gray4] {
    border-top: 1px solid @gray4;
}

[blue] {
    color: @blue !important;
}

[red] {
    color: @red !important;
}

[white] {
    color: #fff !important;
}

[orange] {
    color: @orange !important;
}

[bg-orange] {
    background-color: @orange !important;
}

[bg-orange-linkable] {
    background-color: @orange !important;
    cursor: pointer;

    &:hover {
        background-color: @orange * 1.2;
        box-shadow: @shadow;
    }
}

[bg-blue] {
    background-color: @blue !important;
}

[bg-empty-blue-linkable] {
    cursor: pointer;

    &:hover {
        background-color: @blue * 1.2 !important;
        box-shadow: @shadow;
        color: white;
    }
}

[bg-red] {
    background-color: @red !important;
}

[bg-red-linkable] {
    background-color: @red !important;
    cursor: pointer;

    &:hover {
        background-color: @red * 1.5 !important;
        box-shadow: @shadow;
    }
}

[bd-blue] {
    border: 1px solid @blue !important;
}

[bd-orange] {
    border: 1px solid @orange !important;
}


[nopd] {
    padding: 0 !important;
}

[nobd] {
    border: 0 !important;
    box-shadow: none !important;

    &:before {
        width: 0 !important;
    }

    &:after {
        width: 0 !important;
    }

    * {
        border: 0 !important;
        box-shadow: none !important;

        &:before {
            width: 0 !important;
        }

        &:after {
            width: 0 !important;
        }
    }
}

[nobdb] {
    border-bottom: 0 !important;
}

[nobdl] {
    border-left: 0 !important;
}
/* 表示元素的背景要横向沾满整个屏幕 */
.full-background {
    width: 100%;
    padding-left: 100vw !important;
    padding-right: 100vw !important;
    margin-left: -100vw !important;
    box-sizing: content-box !important;
}

[disabled] {
    color: @gray3;
    cursor: not-allowed !important;
}

[selected] {
    color: @blue;
}

/* 表示元素可以被点击 */
[linkable] {
    cursor: pointer;

    &:hover {
        color: @blue !important;
        border-color: @blue !important;
        text-decoration: underline;
        //box-shadow: @shadow;
    }
}
[linkable-noline] {
    cursor: pointer;

    &:hover {
        color: @blue !important;
        border-color: @blue !important;
    }
}
[linkable-gray1] {
    cursor: pointer;

    &:hover {
        color: @gray1 !important;
        border-color: @gray1 !important;
        text-decoration: underline !important;
        //box-shadow: @shadow;
    }
}
[linkable-gray2] {
    cursor: pointer;

    &:hover {
        color: @gray2 !important;
        border-color: @gray2 !important;
        text-decoration: underline !important;
        //box-shadow: @shadow;
    }
}
[linkable-gray3] {
    cursor: pointer;

    &:hover {
        color: @gray3 !important;
        border-color: @gray3 !important;
        text-decoration: underline !important;
        //box-shadow: @shadow;
    }
}
[linkable-gray4] {
    cursor: pointer;

    &:hover {
        color: @gray4 !important;
        border-color: @gray4 !important;
        text-decoration: underline !important;
        //box-shadow: @shadow;
    }
}
[linkable-gray5] {
    cursor: pointer;

    &:hover {
        color: @gray5 !important;
        border-color: @gray5 !important;
        text-decoration: underline !important;
        //box-shadow: @shadow;
    }
}
[linkable-white] {
    cursor: pointer;

    &:hover {
        color: white !important;
        border-color: white !important;
        text-decoration: underline;
        //box-shadow: @shadow;
    }
}

.bigtitle {
    height: 40px;
    line-height: 39px;
    border-bottom: 1px solid #ddd;

    &-title {
        float: left;
        padding-right: 5px;
        font-size: 16px;
        border-bottom: 1px solid #555;
    }
}

.bdgrp {
    &-item {
        border: 1px solid @gray4;

        &:first-child {
            border-right: 0 !important;
        }

        &:last-child {
            border-left: 0 !important;
        }
    }
}

table.minitable {
    border: 0;
    border-spacing: 0;
    line-height: 20px;
    font-size: 12px;
    tr {
        td, th {
            padding: 2px 5px;
            border-bottom: 1px solid @gray4;
            border-right: 1px solid @gray4;
            &:first-child {
                border-left: 1px solid @gray4;
            }
        }
        &:first-child {
            td, th {
                border-top: 1px solid @gray4;
            }
        }
        th {
            background-color: @gray5;
        }
    }
    &-child {
        tr{
            &:first-child {
                td, th {
                    border-top: 0;
                }
            }
            &:last-child {
                td, th {
                    border-bottom: 0;
                }
            }
            td, th{
                &:first-child {
                    border-left: 0;
                }
                &:last-child {
                    border-right: 0
                }
            }
        }
    }
    &-empty {
        tr {
            td, th {
                padding: 2px 5px;
                border-bottom: 1px solid @gray4;
                &:first-child {
                    border-left: 1px solid @gray4;
                }
                &:last-child {
                    border-right: 1px solid @gray4;
                }
            }
            &:first-child {
                td, th {
                    border-top: 1px solid @gray4;
                }
            }
            th {
                background-color: @gray5;
            }
        }
    }
    &-easy {
        tr {
            td, th{
                border-top: 0 !important;
                border-left: 0 !important;
                border-right: 0 !important;
            }
            &:first-child {
                th {
                    border-bottom: 0 !important;
                }
            }
        }
    }
}

.show {
    visibility: visible;
}
.hidden {
    visibility: hidden;
}

.easyshow {
    .easyshow-content {
        visibility: hidden;
    }
    &:hover {
        .easyshow-content {
            visibility: visible;
        }
    }
}

a {
    color: @gray1;
}


/*iview样式覆盖*/
.ivu-btn,
.ivu-input-group-append,
.ivu-input-group-prepend,
.ivu-input-number-input,
.ivu-input,
.ivu-card,
.ivu-radio-group-button .ivu-radio-wrapper:first-child,
.ivu-radio-group-button .ivu-radio-wrapper:last-child,
.ivu-select-selection,
.ivu-page.mini .ivu-page-options-elevator input {
    border-radius: 0 !important;
}
// .ivu-radio .ivu-input {
//     border-radius: 50% !important;
// }

.ivu-input-prefix span,
.ivu-input-suffix span {
    font-size: 16px;
    line-height: 32px;
    color: #808695;
}

.ivu-input-wrapper-small .ivu-input-prefix span,
.ivu-input-wrapper-small .ivu-input-suffix span {
    font-size: 14px;
    line-height: 24px;
}

.ivu-btn-text {
    padding: 0;

    &:hover {
        background-color: rgba(0, 0, 0, 0) !important;
    }
}

.ivu-table-cell {
    padding-left: 5px !important;
    padding-right: 5px !important;
}
.ivu-timeline-item {
    padding: 0 !important;
}

.ivu-poptip-popper {
    min-width: 0 !important;
}

// .ivu-form-item{
//     margin-bottom: 20px !important;
// }